package com.austin.smp.service;

import com.austin.smp.common.api.ServerResponse;
import com.austin.smp.entity.Category;

import java.util.List;

/**
 * @author austin
 * @since austin/6/22 21:54
 */

public interface CategoryService {

    //新增分类
    ServerResponse addCategory(String categoryName, Integer parentId);

    //删除分类
    ServerResponse<String> deleteCategory(Integer categoryId);

    //更新分类
    ServerResponse updateCategoryName(Integer categoryId, String categoryName);

    //获取品类子节点(平级)
    ServerResponse<List<Category>> selectChildrenParallelCategory(Integer categoryId);

    //获取当前分类id及递归子节点categoryId
    ServerResponse<List<Integer>> selectCategoryAndChildrenById(Integer categoryId);
}
